package com.ruoyi.shoufang.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class SaveSfContractForm implements Serializable {

	//上一个合同ID
	private String lastContractId;

	//上一个合同编号
	private String lastContractNo;

	//小区名称
	@NotEmpty(message = "非空")
	private String premiseName;

	//房产信息
	@NotEmpty(message = "非空")
	private String houseName;

	//房产ID
	private String houseId;

	//所有权类型
	@NotNull(message = "非空")
	private Integer houseType;

	//房产证书编号
	@NotEmpty(message = "非空")
	private String houseZsNo;

	//产权地址
	@NotEmpty(message = "非空")
	private String cqAddress;

	//业主姓名
	@NotEmpty(message = "非空")
	private String ownerName;

	//业主/签约人证件类型
	private Integer certificateType;

	//业主证件号
	@NotEmpty(message = "非空")
	private String ownerIdCard;

	//业主手机号
	@NotEmpty(message = "非空")
	@Pattern(regexp = "^1[35789]\\d{9}$",message = "手机号格式错误")
	private String ownerMobile;

	//业主联系地址
	@NotEmpty(message = "非空")
	private String ownerContactAddress;
	
	//是否为签约人 0:是   1:否
	private Integer signWithOwner;

	//签约人
	@NotEmpty(message = "非空")
	private String signUserName;

	//签约人证件号
	@NotEmpty(message = "非空")
	private String signUserIdCard;

	//签约人手机号
	@NotEmpty(message = "非空")
	@Pattern(regexp = "^1[35789]\\d{9}$",message = "手机号格式错误")
	private  String signUserMobile;

	//紧急联系电话
	@NotEmpty(message = "非空")
	@Pattern(regexp = "^1[35789]\\d{9}$",message = "手机号格式错误")
	private String signUserEmergencyPhone;


	//持卡人姓名
	private String bankUserName;

	//持卡人身份证
	private String bankUserIdCard;

	//开户行
	private String bankOpen;

	//开户银行
	private String bankName;
	
	/*******************5个新加字段start*********************/   
    /**
     * 银行账户类型（对公账户、对私账户）AccountTypeEnum
     */
    private Long accountType;
    
    /**
     * 银行卡号
     */
    private String bankCardNumber;

    /**
     * 账户名称（对公为企业名称，对私为姓名）
     */
    private String accountName;

    /**
     * 联行行号（手输，对公必须）
     */
    private String bankBranchCodeLh;
    
    /**
     * 开户行所在省ID
     */
    private Integer bankAccountProvince;

	//租约起始日期
	@NotNull(message="不能为空")
	@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
	private Date leaseStartTime;

	//租约结束日期
	@NotNull(message="不能为空")
	@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
	private Date leaseEndTime;

	//租金
	@NotEmpty
	@Pattern(regexp="([1-9]\\d*|0)(\\.\\d{1,2})?",message="租金格式错误")
	private String monthRent;

	//押金
	@NotEmpty
	@Pattern(regexp="([1-9]\\d*|0)(\\.\\d{1,2})?",message="押金格式错误")
	private String depositMoney;

	//押几
	@NotNull(message="不能为空")
	private Integer depositType;

	//付几
	@NotNull(message="不能为空")
	private Integer paymentType;

	//备注
	private String remark;

	//房产证件照
	private String[] houseDocumentPhotos;

	//收房合同照
	private String[] contractPhotos;

	//业主身份证照
	private String[] cardPhotos;

	//代理人身份证明照
	private String[] agentCardPhotos;

	//银行卡信息照
	private String[] bankCardInformationPhotos;

	//委托书照
	private String[] attorneyPhotos;

	//物业交割单照
	private String[] propertyDeliverys;

	//其他照
	private String[] otherPhotos;
		

	/**
	 * 合同总金额（非保存项）
	 */
	private BigDecimal totalAmount;
	/**
	 * 收款计划首期or押金日期变更标志（非保存项）
	 */
	private Integer preCycleChange;

	/*付款信息单*/
	List<CwPaymentPlan> payMentltems;

	/**
	 * 房产类型
	 */
	private String leaseType;

	/*解约协议录入*/
	// 合同编号
	private String contractId;
	// 物业交割时间
	private Date wyjgDate;
	// 解约类型
	private Integer terminationType;
	// 结算合计
	private BigDecimal finalStatement;
	// 应收应退
	private List<TSfFinalStatementDetail> statementList;
	// 邮箱
	private String email;

	private Integer countMonth;
	private String sfContractNo;
	private Integer leaseTypeId;
}
